package ui.frame.dialog.panel;

import static constants.GTextbookConstants.*;

import java.awt.Image;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.Box;
import javax.swing.SwingConstants;

public class FigurePanel extends JPanel{
	
	public FigurePanel(ImageIcon icon, String localPath){
		this.localPath = localPath;
		figLabel = new JLabel(icon,SwingConstants.CENTER);
		figLabel.setSize(Figure_Dimension);
		figName = new JTextField();
		figName.setSize(Figure_Name_Dimension);
		figName.setFont(Input_English_Font);
		Box box = Box.createVerticalBox();
		box.add(figLabel);
		box.add(figName);
		this.add(box);
	}

	
	public FigurePanel(String name, String localPath){
		this.localPath = localPath;
		figLabel = new JLabel();
		figName = new JTextField(name);
		figLabel.setSize(Figure_Dimension);
		figName.setSize(Figure_Name_Dimension);
		figName.setFont(Input_English_Font);
		Box box = Box.createVerticalBox();
		box.add(figLabel);
		box.add(figName);
		this.add(box);
	}
	
	public FigurePanel(String name, ImageIcon icon, String localPath){
		this.localPath = localPath;
		figLabel = new JLabel(icon,SwingConstants.CENTER);
		figName = new JTextField(name);
		figLabel.setSize(Figure_Dimension);
		figName.setSize(Figure_Name_Dimension);
		figName.setFont(Input_English_Font);
		Box box = Box.createVerticalBox();
		box.add(figLabel);
		box.add(figName);
		this.add(box);
	}

	private JLabel figLabel;
	private JTextField figName;
	private String localPath;
	
	public String getLocalPath() {
		return localPath;
	}


	public void setLocalPath(String localPath) {
		this.localPath = localPath;
	}


	public JLabel getFigLabel() {
		return figLabel;
	}

	public void setFigLabel(JLabel figLabel) {
		this.figLabel = figLabel;
	}

	public JTextField getFigName() {
		return figName;
	}

	public void setFigName(JTextField figName) {
		this.figName = figName;
	}
}
